package edu.zzuli.assistant.api.action;

import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
import edu.zzuli.assistant.bean.Notice;
import edu.zzuli.assistant.service.NoticeService;
import edu.zzuli.assistant.service.impl.NoticeServiceImpl;
import edu.zzuli.assistant.until.StrUtil;

public class NoticeAction extends ActionSupport{
	
	private NoticeService noticeService =new NoticeServiceImpl();
	private List<Notice> noticeList;
	private Notice notice ;
	private int page =1;//评论当前页数 默认第一页
	private String picList[];
	
	public String[] getPicList() {
		return picList;
	}

	public void setPicList(String[] picList) {
		this.picList = picList;
	}
	public List<Notice> getNoticeList() {
		return noticeList;
	}
	public void setNoticeList(List<Notice> noticeList) {
		this.noticeList = noticeList;
	}
	
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		this.page = page;
	}
	public Notice getNotice() {
		return notice;
	}
	public void setNotice(Notice notice) {
		this.notice = notice;
	}

	// 列表
	public void  list(){
		noticeList=noticeService.getNoticList(page, 3);
		StrUtil.sendJson(noticeList);
	}
}
